#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <ctime>
#include <numeric>
#include <string>
#include <vector>

using namespace std;


struct SuperString{

private:
	struct Suf{
		int L, p;
		Suf() : L(0), p(0) {}
		Suf(int L, int p) : L(L), p(p) {}
	};

	struct Vector{
		Suf a[18];
		int n;
		Vector() : n(0) {}
		void push_back(const Suf & suf)
		{
			a[n++] = suf;
		}
		int size() { return n; }
		Suf & operator[](int k) { return a[k]; }
		Suf & back() { return a[n - 1]; }
	};

	int m[300500], z[300500], N;
	char S[300500];
	Vector suf, newSuf;

	void PushNewSuf(int p, int L)
	{
		if (L <= newSuf.back().L) return;
		if (p == newSuf.back().p && newSuf.back().L >= 2 * newSuf.back().p)
		{
			newSuf.back().L = L;
			return;
		}
		newSuf.push_back(Suf(L, p) );
	}

	void updatePL(int & p, int & L, int & L_)
	{
		if (S[N] != S[N - L + 1 + p])
			p = L - L_;
		if (S[N] != S[N - L + 1])
			L -= p;
		L_ = L;
	}

	int initNewSuf()
	{
		newSuf = Vector();
		newSuf.push_back( Suf(1, 1));
		if (S[N] == S[N - 1])
			newSuf.push_back(Suf(2, 1));
		return newSuf.back().L;
	}

	void genSufs()
	{
		int L_ = initNewSuf();
		for (int j = 0; j < suf.size(); j++)
		{
			int L = suf[j].L + 2, p = suf[j].p;
			updatePL(p, L, L_);
			PushNewSuf(p, L);
		}
		suf = newSuf;
	}


	int updateZ(int L, int p)
	{
		if (L < 3 * p)
			z[N - L] = m[N - L];
		return z[N - L] |= m[N - p - L % p];
	}


	void genM()
	{
		m[N] = 0;
		for (int j = 0; j < suf.size(); j++)
		{
			m[N] |= updateZ(suf[j].L, suf[j].p);
		}
		m[N] *= 2;
	}

public:
	SuperString(char c)
	{
		S[0] = '#', S[1] = c;
		m[0] = 1, m[1] = 2;
		N = 1;
		suf.push_back(Suf(1, 1));
	}

	void addLetter(char c)
	{
		S[++N] = c;
		genSufs();
		genM();
	}

	bool canPrefInK(int n, int k)
	{
		return (m[n] & (1 << k)) != 0;
	}
};


char buf[30500500];
int bufL;


void main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	string s;
	cin >> s;
	static SuperString S(s[0]);
	int n = s.size();
	for (int i = 1; i < n; i++)
	{
		S.addLetter(s[i]);
	}
	for (int i = 1; i <= 31; i++)
	{
		for (int j = 1; j <= n; j++)
		{
			buf[bufL++] = S.canPrefInK(j, i) ? '+' : '.';
		}
		buf[bufL++] = '\n';
	}
	puts(buf);
}
